<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 28/9/2017
 * Time: 下午 5:51
 */

namespace app\common\validate;


use think\Validate;

class Deal extends Validate
{
    protected $rule=[
        'id'=> 'number',
        'name'=> 'require',
        'category_id'=> 'number',
        'se_category_id'=> 'number',
        'bis_id'=> 'number',
        'location_ids'=> 'number',
        'image' => 'require',
        'description'=> 'require',
        'start_time'=> 'require',
        'end_time'=> 'require',
        'origin_price'=> 'require',
        'current_price'=> 'require',
        'city_id'=> 'number',
        'buy_count'=> 'require',
        'total_count'=> 'require',
        'coupons_begin_time' => 'require',
        'coupons_end_time' => 'require',
        'xpoint'=> 'require',
        'ypoint'=> 'require',
        'bis_account_id'=> 'require',
        'balance_price'=> 'require',
        'notes'=> 'require',
        'listorder'=> 'number',
        'status'=> 'number|in:-1,0,1,2',
    ];

    protected $scene=[
        'add' => ['name','image',]
    ];
}